package test;

import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author SWJ
 * @create 2021-07-16 15:44
 */
public class ioc2 {
    @Test
    //1.读取配置文件
    public void ioc2(){
        ClassPathXmlApplicationContext SPRING=
                new ClassPathXmlApplicationContext("spring-config2.xml");
//getbean
        Object o=SPRING.getBean("Usertest2");
        System.out.println(o);


    }
}
